﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceCS.DataStructure.Core.Graphic
{
    /// <summary>
    /// 图操作接口
    /// </summary>
    public interface IGraph<T>
    {
        /// <summary>
        /// 获取顶点数
        /// </summary>
        /// <returns></returns>
        int GetCountOfVertexNode();

        /// <summary>
        /// 获取边或弧的数目
        /// </summary>
        /// <returns></returns>
        int GetCountOfEdge();
        /// <summary>
        /// 在两个顶点之间添加权为 weight 的边或弧
        /// </summary>
        /// <param name="node1"></param>
        /// <param name="node2"></param>
        /// <param name="weight">权重</param>
        void AddEdge(VertexNode<T> node1, VertexNode<T> node2, int weight);
        /// <summary>
        /// 删除两个顶点之间的边或弧
        /// </summary>
        /// <param name="ndoe1"></param>
        /// <param name="node2"></param>
        void RemoveEdge(VertexNode<T> ndoe1, VertexNode<T> node2);
        /// <summary>
        /// 判断两个顶点之间是否有边或弧
        /// </summary>
        /// <param name="node1"></param>
        /// <param name="node2"></param>
        /// <returns></returns>
        bool HasEdge(VertexNode<T> node1, VertexNode<T> node2);
    }
}
